package com.yuelife.service.impl;

import com.yuelife.dao.WorkmanDao;
import com.yuelife.pojo.Workman;
import com.yuelife.service.WorkmanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



/**
 * @author by Rxzeg
 * @date 2020-07-02 21:32
 * @describe
 */
@Service
public class WorkmanServiceImpl implements WorkmanService {
    @Autowired
    private WorkmanDao workmanDao;
    @Override
    public Workman findByName(String tel) {
        Workman man= workmanDao.findByName(tel);
        return man;
    }

    @Override
    public Workman findByNameAndPassword(String tel, String password) {
        return workmanDao.findByNameAndPassword(tel,password);
    }

    @Override
    public Workman findByid(Integer id) {
        return workmanDao.selectByPrimaryKey(id);
    }
}
